<template>
	<view class="page page-fill">
		<form @submit="formSubmit">
			<view class="page-block" style="margin-top: 20rpx;">
				<input type="text" :value="globalUser.username" name="username" placeholder="请输入昵称"
					placeholder-class="graywords" maxlength="10" />
					
				<button type="primary" form-type="submit" class="submitBtn">提交</button>	
			</view>
		</form>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				globalUser: {}
			}
		},
		onLoad() {
			this.globalUser = this.$getGlobalUser()
		},
		methods:{
			formSubmit(e) {
				const data = e.detail.value.unsername
				// 得到消息，请求后台接口
			}
		}
	}
</script>

<style lang="scss" scoped>
	.page-fill {
		width: 100%;
		height: 100%;
		position: absolute;
	}

	.graywords {
		color: #eaeaea;
	}

	.input {
		height: 80rpx;
		line-height: 80rpx;
		width: 500rpx;
		margin-left: 40rpx;
	}
	
</style>
